package top.songxs.gmall.product.rpc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.product.rpc.biz.SkuDetailVoRpcService;
import top.songxs.gmall.product.vo.SkuDetailVo;

@RestController
@RequestMapping("/api/inner/product")
public class SkuDetailVoRpcController {

    @Autowired
    private SkuDetailVoRpcService skuDetailVoRpcService;

    @GetMapping("/getSkuDetailVo/{skuId}")
    public Result<SkuDetailVo> getSkuDetailVo(@PathVariable("skuId") Long skuId) {
        return this.skuDetailVoRpcService.getSkuDetailVo(skuId);

    }
}
